home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
AMIGA
/
AMICUS
/
AMICUS15.ADF
/
C
/
FM
/
misc.c
< prev
next >
Wrap
C/C++ Source or Header
|
1988-04-20
|
3KB
|
188 lines
/* :ts=8 bk=0
* Static structure definitions (mostly for Intuition).
*/
#include <exec/types.h>
#include <intuition/intuition.h>
#include <devices/trackdisk.h>
#include "things.h"
/*
* IntuiText structures for AutoRequestors
*/
struct IntuiText ok = {
AUTOFRONTPEN, AUTOBACKPEN,
AUTODRAWMODE, AUTOLEFTEDGE, AUTOTOPEDGE,
AUTOITEXTFONT,
(UBYTE *) "OK",
AUTONEXTTEXT
};
struct IntuiText errmsg = {
AUTOFRONTPEN, AUTOBACKPEN,
AUTODRAWMODE, AUTOLEFTEDGE, AUTOTOPEDGE,
AUTOITEXTFONT,
NULL, /* Gets filled in later */
AUTONEXTTEXT
};
/*
* Gadgets 'n stuff.
*/
SHORT filebox[] = { /* Coordinates for box surrounding gadget */
-2, 9,
-2, -2,
401, -2,
401, 9,
-1, 9,
-1, -2,
400, -2,
400, 9
};
SHORT devbox[] = {
-2, 9,
-2, -2,
41, -2,
41, 9,
-1, 9,
-1, -2,
40, -2,
40, 9
};
SHORT redrawbox[] = {
-2, 10,
-2, -1,
65, -1,
65, 10,
-1, 10,
-1, -1,
64, -1,
64, 10
};
struct Border bord[] = { /* Borders for gadgets */
{
0, 0,
1, 0, JAM1,
8,
filebox,
NULL
}, {
0, 0,
1, 0, JAM1,
8,
devbox,
NULL
}, {
0, 0,
1, 0, JAM1,
8,
redrawbox,
NULL
}
};
struct IntuiText rdtext = { /* Text for redraw gadget */
1, 0, JAM1,
4, 1,
NULL,
(UBYTE *) "Refresh",
NULL
};
struct IntuiText fnametxt = { /* Text for filename gadget */
1, 0, JAM1,
0, -10,
NULL,
(UBYTE *) "Filename",
NULL
};
struct IntuiText devnamtxt = { /* Text for device name gadget */
1, 0, JAM1,
0, -10,
NULL,
(UBYTE *) "Device",
NULL
};
/*
* Filename gadget special info.
*/
char filename[80], ufilename[80];
struct StringInfo filenamegad = {
(UBYTE *) filename, (UBYTE *) ufilename,
0, 80, 0,
0, 0, 0, 0, 0, 0, 0, 0
};
char devname[10], udevname[10];
struct StringInfo devnamegad = {
(UBYTE *) devname, (UBYTE *) udevname,
0, 10, 0,
0, 0, 0, 0, 0, 0, 0, 0
};
/*
* List of gadgets for window.
*/
struct Gadget gad[] = {
{ /* Filename */
&gad[1],
XOFF, LABEL_Y+15, 50*8, 10,
GADGHCOMP,
RELVERIFY,
STRGADGET,
(APTR) &bord[0], NULL,
&fnametxt,
0,
(APTR) &filenamegad,
0, 0
}, { /* Device */
&gad[2],
XOFF+XOFF+50*8+20, LABEL_Y+15, 5*8, 10,
GADGHCOMP,
RELVERIFY,
STRGADGET,
(APTR) &bord[1], NULL,
&devnamtxt,
0,
(APTR) &devnamegad,
1, 0
}, { /* Refresh */
NULL,
XOFF+NUMCYLS*XX+20, BRKOVER, 64, 10,
GADGHCOMP,
RELVERIFY,
BOOLGADGET,
(APTR) &bord[2], NULL,
&rdtext,
0, 0, 2, 0
}
};
/*
* Window definition
*/
struct NewWindow windef = {
0, 0, 640, 180,
-1, -1,
CLOSEWINDOW | GADGETUP,
WINDOWDRAG | WINDOWDEPTH | WINDOWCLOSE | SMART_REFRESH | ACTIVATE,
&gad[0],
NULL,
(UBYTE *) "File Allocation Map",
NULL, NULL, 0, 0, 0, 0,
WBENCHSCREEN
};